<style>
div{
	vertical-align: middle;
}
.show_post {
	padding:40px;
}
.show_post p {
	border-bottom: 1px dashed #EB6100;
    padding: 10px;
}
.show_post p select {
	border-color: #7F9DB9;
	border-style: solid;
	border-width: 1px;
	padding: 2px;
}
.left_post {
	width:100px;
	display:block;
	float:left;
	text-align:right;
	padding-right:20px;
}
.required {
	color: #FF0000;
	display: inline-block;
	font-size: 17px;
	padding-right:5px;
	vertical-align: middle;
}
.text1 {
	border: 1px solid #7F9DB9;
	height: 17px;
	margin-right: 4px;
	padding: 3px 2px 0;
	vertical-align: middle;
	width: 330px;
}
.text2{
	width: 170px !important;
}

.fabu1 {
    background: url("images/psearch.gif") no-repeat scroll 0 -100px transparent;
    border: medium none;
    color: #FFFFFF;
    cursor: pointer;
    font: 700 14px/34px "宋体",sans-serif;
    height: 34px;
    margin-right: 3px;
    overflow: hidden;
    text-align: center;
    width: 107px;
	margin-left:120px;
}
.fabu1:hover{
	padding-left:5px;
}
.list_r{
	float:right;
}
.list_l_one{
	margin-right:15px;
}
.list_r_one{
	margin-right:10px;
}
</style>
<?php

		require_once("./includes/configure.php");
		require_once("./includes/database.php");
		$db = Database::Connect();

		$del_id = $_GET['delete'];
		if(is_numeric($del_id)){
			$sql = "select this_id from qiuzu_qiugou where qiuzu_qiugou = 2 and faburen = ".$_SESSION['user_id'];
			$rs1 = $db->GetResultSet($sql);
			while($row1=mysql_fetch_array($rs1)){
				if($row1['this_id']==$del_id){
					$sql = "delete from qiuzu_qiugou where this_id=$del_id";
					$db->Execute($sql);
					$del_result = '删除成功';
					break;
				}
			}
		}
		
		$sql = "select * from qiuzu_qiugou where qiuzu_qiugou = 2 and faburen = ".$_SESSION['user_id']."
				ORDER BY fabushijian desc";//默认1为求租
		$rs = $db->GetResultSet($sql);
		
		$db->Close();	
?>
<div class="right_container">
  <div id="MyAnjuke">
    <div class="tab">
      <h1>
        <dl>
          <dt class="tL"></dt>
          <dt class="t0">我发布的求购信息</dt>
          <dt class="tR"></dt>
        </dl>
      </h1>
    </div>
    <div class="show_post">
		
		<p class="green info">
			<?php echo $del_result;?>
		</p>
		<?php
			$num =0;
			while($row=mysql_fetch_array($rs)){
				$num++;
			?>
			  <p>
				<span class="list_l_one"><?php echo $num;?></span>
				<span class="list_l">
					<a target="_blank" href="qiuzu_qiugou.php?id=<?php echo $row['this_id']?>">
					<?php echo $row['biaoti']?>
					</a>
				</span>
				<span class="list_r"><?php echo $row['fabushijian']?></span>
				<span class="list_r list_r_one"><a href="geren.php?main=qiugou_list&delete=<?php echo $row['this_id']?>">删除</a></span>
				<?php //<span class="list_r list_r_one"><a href="geren.php?main=qiugou_post&update=<?php echo $row['this_id']? >">编辑</a></span>?>
			  </p>
		<?php
			}
			if(!$num){
				echo '<p>您还未发布过任何信息</p>';
			}
		?>
    </div>
  </div>
</div>
